package com.forum.dao;

import com.forum.pojo.User;

public interface UserDAO {
	/**
	 * 
	  * queryUser 方法 
	  * <p>方法说明:</p> 
	  * @param usernick
	  * @param userPasswd
	  * @return
	  * @throws Exception 
	  * @return User 
	  * @author Evan 
	  * @date 2012-12-16
	 */
	public User queryUser(String usernick, String userPasswd) throws Exception;
	/**
	 * 
	  * addUser 方法 
	  * <p>方法说明:</p> 
	  * @param user
	  * @return
	  * @throws Exception 
	  * @return boolean 
	  * @author Evan 
	  * @date 2012-12-16
	 */
	public int addUser(User user) throws Exception;
	/**
	 * 
	  * validateName 方法 
	  * <p>方法说明:</p> 
	  * @param username
	  * @return
	  * @throws Exception 
	  * @return boolean 
	  * @author Evan 
	  * @date 2012-12-17
	 */
	public boolean validateName(String username) throws Exception;
	/**
	 * 
	  * findUserById 方法 
	  * 方法说明:返回一个user对象 
	  * @param userId
	  * @return
	  * @throws Exception 
	  * @return User 
	  * @author Evan 
	  * @date 2012-12-23
	 */
	public User findUserById(int userId) throws Exception;
	/**
	 * 
	  * updateUserInfo 方法 
	  * 方法说明:更新和完善用户信息 
	  * @param user
	  * @return
	  * @throws Exception 
	  * @return boolean 
	  * @author Evan 
	  * @date 2012-12-23
	 */
	public boolean updateUserInfo(User user) throws Exception;
	
}
